package graduation.project.factory;

import graduation.project.mutant.strategy.MutantsGenerator;

public class MutantGenFactory {
	
	private String packageName = "graduation.project.mutant.strategy.";
	
	public MutantsGenerator createGenerator(String faultType){
		
		MutantsGenerator mg;
		
		try{
			Class c = Class.forName(packageName + faultType + "MutantsGen");
			mg = (MutantsGenerator) c.newInstance();
		}catch (Exception e){
			System.out.println("No Class: " + faultType + "MutantsGen");
			mg = null;
		}
		
		return mg;
	}

}
